package com.sd.repay.service;

import com.sd.repay.pojo.RealAuthBusi;
import com.sd.repay.pojo.RealAuthChannel;
import com.sd.repay.pojo.RealAuthRecord;

import java.util.List;
import java.util.Map;

/**
 * Created by sd on 2018/08/21
 */
public interface RealAuthService {


    /**
     * 获取鉴权通道
     * <p>
     * <p>
     * 获取状态为正常的鉴权通道信息
     *
     * @return
     */
    public List<RealAuthChannel> getRealAuthChannel();


    /**
     * 获取指定鉴权业务
     *
     * @param realType    鉴权类型 2.2要素 3.3要素 4.4要素
     * @param realChannel 鉴权渠道标识
     * @param busiStatus  状态 1.开启 0.关闭
     * @return 鉴权业务
     * @throws Exception
     */
    public RealAuthBusi getRealAuthBusi(String realType, String realChannel, String busiStatus);


    /**
     * 获取鉴权业务
     *
     * @param realType   鉴权类型 2.2要素 3.3要素 4.4要素
     * @param busiStatus 状态 1.开启 0.关闭
     * @return 鉴权业务
     * @throws Exception
     */
    public RealAuthBusi getRealAuthBusi(String realType, String busiStatus);


    /**
     * 获取鉴权记录
     *
     * @param realAuthRecord 鉴权信息
     * @return 鉴权结果
     * @throws Exception
     */
    public RealAuthRecord getRealAuthRecord(RealAuthRecord realAuthRecord);


    /**
     * 获取未校验认证记录
     *
     * @param realId 鉴权记录编号
     * @return 鉴权明细
     */
    public RealAuthRecord getRealAuthRecord(String realId);

    Long saveRealAuthRecord(Map<String, String> recordMap) throws Exception;

    int updateRealAuthStatus(RealAuthRecord realAuthRecord) throws Exception;

}
